package com.hxx.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;
import org.springframework.ai.chat.messages.MessageType;

import java.io.Serializable;
import java.util.List;

/**
 * 历史消息
 */
@Data
@TableName("ai_message")
public class AiMessage extends BaseEntity implements Serializable {

    /**
     * 消息类型(用户/助手/系统)
     */
    private MessageType type;

    /**
     * 消息内容
     */
    private String textContent;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<MediaZmx> medias;

    @TableField("ai_session_id")
    private String sessionId;
}
